<!--/* 作者页面 */-->
<!DOCTYPE html>
<html
  xmlns:th="https://www.thymeleaf.org"
  th:replace="~{layout :: layout(_title = ~{::title}, _header = ~{::header}, _content = ~{::content})}"
>
  <th:block th:fragment="title">
    <th:block th:text="${author.spec.displayName} + '|' + ${site.title}"></th:block>
  </th:block>

  <th:block th:fragment="header">
    <div class="author-header">
      <th:block th:replace="~{macro/page-header :: page-header(extension = ${author}, frontCover = ${#annotations.getOrDefault(author, 'cover', '')}, headerTitle = ~{::headerTitle})}" />
    </div>
  </th:block>

  <th:block th:fragment="headerTitle">
    <h1 data-i18n="page.author.title" th:i18n-options="|{ authorName: '${author.spec.displayName}' }|"></h1>
  </th:block>

  <th:block th:fragment="content">
    <div id="primary" th:with="postItems=${posts.items}">
      <main id="main" class="site-main" role="main">
        <th:block th:if="${posts.totalPages gt 0}">
          <th:block th:each="post : ${postItems}">
            <th:block th:replace="~{macro/content :: content(${post})}" />
          </th:block>
          <div class="clearer"></div>
        </th:block>
        <th:block th:unless="${posts.totalPages gt 0}">
          <th:block th:replace="~{macro/content-none}" />
        </th:block>
      </main>
      <th:block th:replace="~{module/list-pagination :: pagination(${posts})}"></th:block>
    </div>
  </th:block>
</html>
